#include<stdio.h>
#include<sys/stat.h>
#include<sys/types.h>
#include<unistd.h>
#include<fcntl.h>
#include<string.h>


int main(int argc, char const *argv[])
{
	int fd;
	char buf;
	if(argc != 2)
	{
		printf("error parameter\n");
		return 0;
	} 

	if((fd = open(argv[1], O_RDONLY)) < 0)
	{
		printf("error name\n");
		return 0;
	}
	while(read(fd, &buf, 1))
	{
		write(0, &buf, 1);
	}

	close(fd);
	return 0;
}